<%@page language="java" import="com.scalar.chiptrack.finance.purchaseorder.PurchaseOrder,
                                com.scalar.chiptrack.utils.StringUtils,
                                com.scalar.chiptrack.finance.purchaseorder.PurchaseOrderLineItem" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-nested.tld" prefix="nested" %>
<%@ taglib uri="/WEB-INF/chiptrack-tags.tld" prefix="chiptrack" %>

<%@ page import="com.scalar.chiptrack.utils.ConfigManager"%>

<% int i = 0; /*variable used to assign numers to marketing part number drop down*/ %>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html:html>
<HEAD><TITLE>Scalarsoft - ChipTrac</TITLE>

<%String chipTracContext = "/" + ConfigManager.getChipTracContext();%>

<chiptrack:checkLogon sourcePage="/jsp/finance/confirm_purchase_order_entry.jsp"/>

<META http-equiv='Content-Type' content='text/html; charset=windows-1252'>
<LINK href='<%=chipTracContext%>/jsp/includes/stylesheets/scalarsoft.css' type='text/css' rel='stylesheet'>

<SCRIPT language="JavaScript" src="<%=chipTracContext%>/jsp/includes/scripts/validations.js">
</script>

<SCRIPT language='JavaScript'>

function purchasingDateEntry()
{
    var requistionDate = document.purchaseOrderForm['purchaseOrder.poDate'].value;
    newWindow = window.open ('<%=chipTracContext%>/purchaseOrder.do?action=purchasingDateEntry&purchaseOrder.purchaseOrderDate='+requistionDate+'&purchaseOrder.poHold=true&origin=view','optionsPopup','channelmode=no,directories=no,toolbar=no,menubar=no,personalbar=no,status=yes,scrollbars=no,width=700,height=380,left=150,top=100,resizable=yes');
}

function approvePurchaseOrder()
{
   var statusType = purchaseOrderForm.statusType.value;
   var poNumber = document.purchaseOrderForm['purchaseOrder.poNumber'].value;
   document.purchaseOrderForm.action=" <%=chipTracContext%>/purchaseOrder.do?action=approved&poNumber="+poNumber+"&statusType="+statusType;
   document.purchaseOrderForm.submit();
}
function sendMail()
{
    var poNumber = document.purchaseOrderForm['purchaseOrder.poNumber'].value;
    newWindow = window.open ('<%=chipTracContext%>/poSendMail.do?poNumber=' + poNumber ,'sendMailPopup','channelmode=no,directories=no,toolbar=no,menubar=no,personalbar=no,status=no,scrollbars=yes,width=800,height=480,resizable=yes');
    newWindow.focus();
}

function printableVersion()
{
    var poNumber = document.purchaseOrderForm['purchaseOrder.poNumber'].value;
    newWindow = window.open ('<%=chipTracContext%>/purchaseOrder.do?action=printerFriendly&poNumber='+poNumber,'optionsPopup','channelmode=no,directories=no,toolbar=no,menubar=no,personalbar=no,status=yes,scrollbars=yes,width=700,height=700,resizable=yes,screenX=5,screenY=55,left=50,top=40');
    newWindow.focus();
}
function refresh()
{
    self.location.replace ( '<%= request.getRequestURL() + "?" + request.getQueryString() %>' );
}

</SCRIPT>
</HEAD>
<%
    String heading;
    String functionalityString;
    String userString;
    String statusType = request.getParameter("statusType");
    if ( statusType != null & statusType.equalsIgnoreCase("Pending"))
    {
        heading = "Approve Purchase Order";
        functionalityString = Functionality.APPROVE_PURCHASE_ORDER;
        userString = User.USER_ACTION_MODIFY;
    }
    else if ( statusType != null & statusType.equalsIgnoreCase("Cancelled"))
    {
        heading = "Cancelled Purchase Order";
        functionalityString = Functionality.CANCELLED_PURCHASE_ORDER;
        userString = User.USER_ACTION_VIEW;
    }
    else
    {
        heading = "View Purchase Order";
        functionalityString = Functionality.VIEW_PURCHASE_ORDER;
        userString = User.USER_ACTION_VIEW;
    }

%>

<BODY bgColor='#ffffff' leftMargin='0' topMargin='0' marginheight='0' marginwidth='0'>
<!-- Top Header Start-->

<%@include file="/jsp/includes/header.jsp"  %>
<!-- Top Header End-->
<p>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
  <TBODY>
  <TR>
	<TD width='180' valign='top' background='<%=chipTracContext%>/jsp/includes/images/left_red_bg.gif'>

<!-- Side Navigation start -->

<%@include file="/jsp/finance/purchase_order_menu.jsp" %>

</TD>
<!-- end of the side navigations -->

<TD bgcolor="#ffffff">
<IMG height=9 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=8></TD>
<TD bgcolor="#ffffff"><IMG height=480 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=2></TD>
<TD valign="top" width="100%">

<!-- SiteMap Tag --><%--
<chiptrack:sitemap styleClass="NArialS"/>--%>
<chiptrack:permission functionality='<%=functionalityString%>'
    action='<%=userString%>' styleClass="NArialL" >
</chiptrack:permission>

<IMG height=1 src="<%=chipTracContext%>/jsp/includes/images/clear.gif" width=500 border=0>
<BR>
<!-- from here your body starts -->
			<P>

			<TABLE BORDER="0" WIDTH="100%">

				<TR>
					<TD WIDTH="100%">
            <html:form name="purchaseOrderForm" action="/purchaseOrder.do?action=new" method="post" type="com.scalar.chiptrack.finance.purchaseorder.forms.PurchaseOrderForm">
            <input type="hidden" name="statusType" value="<%= request.getParameter("statusType") %>">
            <TABLE BORDER="0" WIDTH="100%" HEIGHT="175%">
				<TR>
					<TD WIDTH="100%">
						<TABLE BORDER="0" WIDTH="100%">
							<TR>
								<TD WIDTH="100%" class="NArialW">
									<P ALIGN="CENTER"><%= heading %>
                                </TD>
							</TR>
                            <% if( functionalityString.equalsIgnoreCase("View Purchase Orders") ){%>
                            <TR>
								<TD WIDTH="100%" class="NArialW">
                                   <font align=right class="NArialS">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                        <a href="javascript:sendMail();" title='Click here to send mail'><b>[E-mail this Purchase Order]</b></a>&nbsp;&nbsp; &nbsp;&nbsp;
										<font align=right class="NArialS">
									    <a href="javascript:printableVersion();" onMouseOver="window.status='Printer-Friendly Version';return true" onMouseOut="window.status='';return true"><img src='<%=chipTracContext%>/jsp/includes/images/spacer.gif' border='0' height='1' width='1'><b>[Printer-Friendly Version]</b></a></font>
                                </TD>
							</TR>
                            <%}%>
						</TABLE>
                        <BR>
						<BR>
                        <nested:nest property="purchaseOrder">
						<TABLE BORDER="0" WIDTH="100%" CLASS="NArialL"><%
                        if ( statusType != null & statusType.equalsIgnoreCase("All"))
                        {%><TR>
                                <TD WIDTH="3%">&nbsp;</TD>
								<TD colspan="8">
                                    <nested:equal property="poHold" value="true"><IMG SRC="<%=chipTracContext%>/jsp/includes/images/exclamation-46x47.gif" BORDER="0" HEIGHT="20" WIDTH="20" ALIGN="LEFT" ALT="" >
                                    <font  color = "ff0000" >&nbsp; Purchase Order is on HOLD </font>
                                    </nested:equal>
     							</TD>
							</TR><%}%>
                             <TR>
                                <TD WIDTH="9%">&nbsp;</TD>
							</TR>

							<TR>
								<TD WIDTH="3%">&nbsp;</TD>
								<TD WIDTH="17%">PO Number:</TD>
								<TD WIDTH="1%">&nbsp;</TD>
								<TD WIDTH="31%">
                                    <nested:write property="poNumber" />
                                    <nested:hidden property="poNumber" />
                                </TD>
								<TD WIDTH="1%">&nbsp;</TD>
								<TD WIDTH="13%">Type:</TD>
								<TD WIDTH="1%">&nbsp;</TD>
								<TD WIDTH="31%">
                                    <nested:write property="poTypeLabel" /><%-- Commented -- As we should not show Hold check box
                                    &nbsp;&nbsp;&nbsp;<nested:checkbox property="poHold" styleClass="txfield" disabled="true"/> Hold --%>
                                    <nested:hidden property="poHold" />
                                </TD>
								<TD WIDTH="2%">&nbsp;</TD>
							</TR>

							<TR>
								<TD WIDTH="3%">&nbsp;</TD>
								<TD WIDTH="17%">Vendor Name:</TD>
								<TD WIDTH="1%">&nbsp;</TD>
								<TD WIDTH="31%">
                                    <nested:write property="vendorName" />
     							</TD>
								<TD WIDTH="1%">&nbsp;</TD>
								<TD WIDTH="13%">PO Date:</TD>
								<TD WIDTH="1%">&nbsp;</TD>
								<TD WIDTH="31%">
                                <nested:hidden property="poDate" />
									<nested:write property="poDate" />&nbsp;
                                    <!-- <a href="javascript:purchasingDateEntry()" onmouseover="window.status='Click here To view Purchasing Date Entry';return true" onmouseout="window.status='';return true">
                                         <IMG SRC="<%=chipTracContext%>/jsp/includes/images/arrow.gif" WIDTH="14" HEIGHT="15" ALIGN="BOTTOM" BORDER="0"></a> -->
								</TD>
								<TD WIDTH="2%">&nbsp;</TD>
							</TR>
							<TR>
								<TD WIDTH="3%">&nbsp;</TD>
								<TD WIDTH="17%">Requistion Date:</TD>
								<TD WIDTH="1%">&nbsp;</TD>
								<TD WIDTH="31%">
                                    <nested:write property="requistionDate" />
     							</TD>
								<TD WIDTH="1%">&nbsp;</TD>
								<TD WIDTH="13%">Required Date:</TD>
								<TD WIDTH="1%">&nbsp;</TD>
								<TD WIDTH="31%">
                                    <nested:write property="requiredDate" />
                                </TD>
								<TD WIDTH="2%">&nbsp;</TD>
							</TR>
							<TR>
								<TD WIDTH="3%">&nbsp;</TD>
								<TD WIDTH="17%">Promised Date:</TD>
								<TD WIDTH="1%">&nbsp;</TD>
								<TD WIDTH="31%">
                                    <nested:write property="promisedDate" />
     							</TD>
								<TD WIDTH="1%">&nbsp;</TD>
								<TD WIDTH="13%" nowrap>Promised Ship Date:</TD>
								<TD WIDTH="1%">&nbsp;</TD>
								<TD WIDTH="31%">
                                    <nested:write property="promisedShipDate" />
                                </TD>
								<TD WIDTH="2%">&nbsp;</TD>
							</TR>
							<TR>
								<TD WIDTH="3%">&nbsp;</TD>
								<TD WIDTH="17%">Last Edited Date:</TD>
								<TD WIDTH="1%">&nbsp;</TD>
								<TD WIDTH="31%">
                                    <nested:write property="lastEditedDate" />
     							</TD>
								<TD WIDTH="1%">&nbsp;</TD>
								<TD WIDTH="13%">Last Released Date:</TD>
								<TD WIDTH="1%">&nbsp;</TD>
								<TD WIDTH="31%">
                                    <nested:write property="lastPrintedDate" />
                                </TD>
								<TD WIDTH="2%">&nbsp;</TD>
							</TR>

							<TR>
								<TD WIDTH="3%">&nbsp;</TD>
								<TD WIDTH="17%"><nested:equal property = "poTypeId" value = "2">Customer Name:</nested:equal>&nbsp;</TD>
								<TD WIDTH="1%">&nbsp;</TD>
								<TD WIDTH="31%">
                                    <nested:equal property = "poTypeId" value = "2"><nested:write property="customerName"/></nested:equal>&nbsp;
                                </TD>
								<TD WIDTH="1%">&nbsp;</TD>
								<TD WIDTH="13%">PO Status:</TD>
								<TD WIDTH="1%">&nbsp;</TD>
								<TD WIDTH="31%">
                                    <nested:equal name="purchaseOrder"  property="poStatus" value="1" >NEW</nested:equal>
                                    <nested:equal name="purchaseOrder"  property="poStatus" value="2" >RELEASED</nested:equal>
                                    <nested:equal name="purchaseOrder"  property="poStatus" value="3" >CHANGE ORDER</nested:equal>
                                    <nested:equal name="purchaseOrder"  property="poStatus" value="4" >RECEIVED</nested:equal>
                                    <nested:equal name="purchaseOrder"  property="poStatus" value="5" >CLOSED</nested:equal>
                                    <nested:equal name="purchaseOrder"  property="poStatus" value="6" >CANCELLED</nested:equal>
                                </TD>
								<TD WIDTH="2%">&nbsp;</TD>
							</TR>

                            <TR>
								<TD WIDTH="3%">&nbsp;</TD>
								<TD WIDTH="13%" nowrap>Ship To Address:</TD>
								<TD WIDTH="1%">&nbsp;</TD>
								<TD WIDTH="31%">
                                    <nested:write property="formattedShippingAddressAsHtml" filter="false"/>
                                </TD>
								<TD WIDTH="51%" colspan="5">&nbsp;</TD>
							</TR>
						</TABLE>
                        <BR>
						<BR>

                        <TABLE BORDER="0" WIDTH="99%" CLASS="NArialL">
							<TR>
								<TD WIDTH="4%" HEIGHT="26" ALIGN="CENTER" BGCOLOR="#993333">
									<P ALIGN="CENTER">&nbsp;<FONT COLOR="white">Line Item</FONT>
								</TD>
								<TD WIDTH="10%" HEIGHT="26" ALIGN="CENTER" BGCOLOR="#993333">
									<P ALIGN="CENTER"><FONT COLOR="white">Part Number</FONT>
								</TD>
								<TD WIDTH="10%" HEIGHT="26" BGCOLOR="#993333">
									<P ALIGN="CENTER"><FONT COLOR="white">Vendor Part Number</FONT>
								</TD>
                                <TD WIDTH="16%" HEIGHT="26" ALIGN="CENTER" BGCOLOR="#993333">
									<P ALIGN="CENTER"><FONT COLOR="white">Description</FONT>
								</TD>
                                <!-- <TD WIDTH="10%" HEIGHT="26" ALIGN="CENTER" BGCOLOR="#993333">
									<P ALIGN="CENTER"><FONT COLOR="white">Site</FONT>
								</TD> -->
                                <TD WIDTH="10%" HEIGHT="26" ALIGN="CENTER" BGCOLOR="#993333">
									<P ALIGN="CENTER"><FONT COLOR="white">Required Date</FONT>
								</TD>

                                <TD WIDTH="10%" HEIGHT="26" ALIGN="CENTER" BGCOLOR="#993333">
									<P ALIGN="CENTER"><FONT COLOR="white">Promised Date</FONT>
								</TD>

								<TD WIDTH="10%" HEIGHT="26" ALIGN="CENTER" BGCOLOR="#993333">
									<P ALIGN="CENTER"><FONT COLOR="white">Requested Quantity</FONT>
								</TD>
								<TD WIDTH="10%" HEIGHT="26" ALIGN="CENTER" BGCOLOR="#993333">
									<P ALIGN="CENTER"><FONT COLOR="white">Quantity Cancelled</FONT>
								</TD>
								<TD WIDTH="10%" HEIGHT="26" ALIGN="CENTER" BGCOLOR="#993333">
									<P ALIGN="CENTER"><FONT COLOR="white">Unit Cost</FONT>
								</TD>
								<TD WIDTH="10%" HEIGHT="26" ALIGN="CENTER" BGCOLOR="#993333">
									<P ALIGN="CENTER"><FONT COLOR="white">Extended Cost</FONT>
								</TD>
                                <TD WIDTH="10%" HEIGHT="26" ALIGN="CENTER" BGCOLOR="#993333">
									<P ALIGN="CENTER"><FONT COLOR="white">Status</FONT>
								</TD>
							</TR>
                            <nested:iterate id= "PurchaseOrderLineItem" property="purchaseOrderLineItemList" type="com.scalar.chiptrack.finance.purchaseorder.PurchaseOrderLineItem" >
							<TR>
								<TD WIDTH="4%" ALIGN="CENTER" BGCOLOR="#DEE1E2">
									<P ALIGN="CENTER">&nbsp;
                                    <nested:write property="poIndex"/>
                                    <nested:hidden property="poIndex" />

                                    <nested:hidden property="poLineItemSequenceNo"/>
                                    <!-- Hidden field stores the no of Line items available for a Purchase Order -->
                                    <nested:hidden property="lineItemCount" />
								</TD>
								<TD WIDTH="10%" ALIGN="LEFT" BGCOLOR="#DEE1E2">
									<P>
                                    <bean:define id="index" value="0"/>
									<nested:write property="marketingPartNo" />                                    
								</TD>
								<TD WIDTH="10%" BGCOLOR="#DEE1E2" align="left">
									<P>
									<nested:write property="manufacturingPartNo" />
								</TD>
                                <TD WIDTH="16%" ALIGN="LEFT" BGCOLOR="#DEE1E2">

									<P><nested:write property="lineItemDescription" />
								</TD>
                                <!-- <TD WIDTH="10%" ALIGN="CENTER" BGCOLOR="#DEE1E2">
									<CENTER>
									<P>
                                    < n e s t e d : w r i t e   p r o p e r t y = "s i t e I d "  />
                                    </CENTER>
								</TD> -->
                                <TD WIDTH="10%" ALIGN="CENTER" BGCOLOR="#DEE1E2">
								  <CENTER>
									<P><nested:write property="requiredDate" />
                                  </CENTER>
								</TD>

                                <TD WIDTH="10%" ALIGN="CENTER" BGCOLOR="#DEE1E2">
								  <CENTER>
									<P><nested:write property="promisedDate" />
                                  </CENTER>
								</TD>

                                <!--TD WIDTH="10%" ALIGN="CENTER" BGCOLOR="#DEE1E2">
									<CENTER>
									<P>
                                    <!--nested:write property="siteId" />
                                    </CENTER>
								</TD-->
                                <TD WIDTH="10%" ALIGN="RIGHT" BGCOLOR="#DEE1E2">
									<P><!--nested:write property="requestedQuantity" /-->
									<P><%= (int) ((PurchaseOrderLineItem)PurchaseOrderLineItem).getRequestedQuantity() %>
								</TD>
								<TD WIDTH="10%" ALIGN="RIGHT" BGCOLOR="#DEE1E2">
									<P><nested:write property="quantityCancelled" />
								</TD>

								<TD WIDTH="10%" ALIGN="RIGHT" BGCOLOR="#DEE1E2">
                                    <P><nested:write property="unitCostAsString" />
                                </TD>
								<TD WIDTH="10%" ALIGN="RIGHT" BGCOLOR="#DEE1E2">
									<P><nested:write property="extendedCostAsString" />
								</TD>
                                <TD WIDTH="10%" ALIGN="CENTER" BGCOLOR="#DEE1E2">
									<CENTER>
									<P>
                                    <nested:write property="poLineItemStatusLabel" />
                                    </CENTER>
								</TD>
							</TR>
                            <% i++;%>
                            </nested:iterate>
                        <!--/TABLE>

						<TABLE BORDER="1" WIDTH="99%" CLASS="NArialL"-->
							<TR>
								<!--TD WIDTH="5%">&nbsp;</TD-->
								<TD colspan="6">&nbsp;</TD>
								<TD colspan="3" align="right">Subtotal:&nbsp;</TD>

								<TD WIDTH="10%" bgcolor="#DEE1E2" ALIGN="RIGHT">
                                    <nested:write property="subTotalAsString" />
                                </TD>
                                <!--TD WIDTH="10%" ALIGN="RIGHT">&nbsp;</TD-->
								<TD WIDTH="10%">&nbsp;</TD>
							</TR>
							<TR>
								<!--TD WIDTH="27%" ALIGN="left">Remaining PO Subtotal:&nbsp;</TD-->
                                <TD colspan="6">&nbsp;</TD>
								<!--TD WIDTH="24%">
                                   <!--nested:write property="remainingPoSubTotalAsString" />
                                </TD-->
                                <TD colspan="3" align="right">Trade Discount:&nbsp;</TD>


								<TD WIDTH="10%" bgcolor="#DEE1E2" ALIGN="RIGHT">
                                    <nested:write property="tradeDiscountAsString" />
                                </TD>
                                <!--TD WIDTH="10%" ALIGN="RIGHT">&nbsp;</TD-->
								<TD WIDTH="10%">&nbsp;</TD>
							</TR>
							<TR>

                                <!-- Commented on 11th Feb 04
                                <TD WIDTH="27%" ALIGN="left">Purchase Addr Tax Schedule:&nbsp;</TD-->
                                <TD colspan="6">Comment:&nbsp;</TD>
								<!--TD WIDTH="24%">
									<!--nested:write property="purchaseAddressTaxScheduleId" />
								</TD-->
                                <TD colspan="3" align="right">Freight:&nbsp;</TD>


								<TD WIDTH="10%" bgcolor="#DEE1E2" ALIGN="RIGHT">
                                    <nested:write property="freightAsString" />
                                </TD>
                                <!--TD WIDTH="10%">&nbsp;</TD-->
                                <TD WIDTH="10%" ALIGN="RIGHT">&nbsp;</TD>
							</TR>
							<TR>
 								 <TD colspan="6" rowspan="7" VALIGN="TOP">
                                    <nested:hidden property="commentId"/>
                                    <nested:textarea property="commentDescription" disabled="true" readonly="true" rows="9" cols="52"/>

                                </TD>
								<TD colspan="3" align="right">Miscellaneous:&nbsp;</TD>
								<TD WIDTH="10%" bgcolor="#DEE1E2" ALIGN="RIGHT">
                                    <nested:write property="miscellaneousAsString" />
                                </TD>
                                <!--TD WIDTH="10%">&nbsp;</TD-->
								<TD WIDTH="10%">&nbsp;</TD>
							</TR>
							<TR>
								<TD colspan="3" align="right">Tax:&nbsp;</TD>
								<!-- <TD WIDTH="24%">&nbsp;</TD>  Because the row span is 3 in the above -->

								<TD width="10%" bgcolor="#DEE1E2" ALIGN="RIGHT">
                                    <nested:write property="taxAsString" />
                                </TD>
								<!--TD WIDTH="10%">&nbsp;</TD-->
                                <TD WIDTH="10%" ALIGN="RIGHT">&nbsp;</TD>
							</TR>
							<TR>
								<TD colspan="3" align="right">Total:&nbsp;</TD>
								<!-- <TD WIDTH="24%">&nbsp;</TD> Because the row span is 3 in the above -->
								<TD WIDTH="10%" bgcolor="#DEE1E2" ALIGN="RIGHT">
                                    <nested:write property="totalAsString" />
                                </TD>
								<!--TD WIDTH="10%">&nbsp;</TD-->
								<TD WIDTH="10%">&nbsp;</TD>
							</TR>
							<TR>
								<TD colspan="3">&nbsp;</TD>
								<TD WIDTH="10%">&nbsp;</TD>
								<!--TD WIDTH="10%" >&nbsp;</TD-->
								<TD WIDTH="10%">&nbsp;</TD>
							</TR>
                            <TR>
								<TD colspan="3">&nbsp;</TD>
								<TD WIDTH="10%">&nbsp;</TD>
								<!--TD WIDTH="10%" >&nbsp;</TD-->
								<TD WIDTH="10%">&nbsp;</TD>
							</TR>
							<TR>
								<TD colspan="5">&nbsp;</TD>
							</TR>
							<TR>
								<TD colspan="5">&nbsp;</TD>
							</TR>
						</TABLE>
						<BR>
						<BR>
					</TD>
				</TR>
			</TABLE>
           </nested:nest>
           </html:form>

					</TD>
				</TR>
				<TR>
					<TD WIDTH="100%">
						<TABLE BORDER="0" WIDTH="100%">
							<TR>
								<TD WIDTH="50%"><%
                                if ( request.getParameter("statusType") != null && request.getParameter("statusType").equalsIgnoreCase("Pending")) {
                                    %><P ALIGN="right"><chiptrack:restrictedLink functionality="<%=Functionality.APPROVE_PURCHASE_ORDER%>"
                                    action="<%=User.USER_ACTION_MODIFY%>" href="javascript:approvePurchaseOrder()"  onmouseover="window.status='Click to Approve Purchase Order ';return true" onmouseout="window.status='';return true"><IMG SRC="<%=chipTracContext%>/jsp/includes/images/approve.gif"  TITLE="Click here to Approve Purchase Order" VALIGN="BOTTOM" BORDER="0"></chiptrack:restrictedLink><%
                                }   %></TD>
								<TD WIDTH="50%"><P ALIGN="left"><A href="purchaseOrder.do?statusType=<%= request.getParameter("statusType") %>" onmouseover="window.status='Click to Cancel and go back ';return true" onmouseout="window.status='';return true"><IMG SRC="<%=chipTracContext%>/jsp/includes/images/cancel.gif"  TITLE="Click here to Cancel and go back" VALIGN="BOTTOM" BORDER="0"></A></TD>
							</TR>
						</TABLE>
					</TD>
				</TR>
			</TABLE>
<!-- Your Work area ends here -->
		</TD>
		<TD BGCOLOR="white"><IMG SRC="images/spacer.gif" WIDTH="1" HEIGHT="1" ALIGN="BOTTOM" BORDER="0"></TD>
	</TR>
</TBODY></TABLE>

<!-- Footer starts here -->

<%@include file="/jsp/includes/footer.jsp" %>

<!-- footer end here -->
</BODY>
</html:html>